package com.keldian.mobilesafe.dao;

import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

/**
 * Created by Administrator on 16-1-22.
 */
public class AntivirsuDao {


    public static boolean isVirus(String md5) {
        String path = "/data/data/com.keldian.mobilesafe/files/antivirus.db";
        boolean result = false;

        SQLiteDatabase db = SQLiteDatabase.openDatabase(path, null, SQLiteDatabase.OPEN_READONLY);

        Cursor cursor = db.rawQuery("select * from datable where md5=?", new String[]{md5});
        if (cursor.moveToNext()) {
            result = true;
        }

        cursor.close();
        db.close();
        return result;
    }

}
